package com.lpf.dao;

import com.lpf.entity.Users;
import com.lpf.orm.annotation.ExtInsert;

import com.lpf.orm.annotation.ExtParam;
import com.lpf.orm.annotation.ExtSelect;

public interface UsersDao {

    // 1.接口既然不能被实例化？那么我们是怎么实现能够调用的？
    // 2.参数如何和sql参数绑定
    // 3.返回结果

    @ExtSelect("select * from users where name=#{name} and age=#{age} ")
    Users selectUsers(@ExtParam("name") String name, @ExtParam("age") Integer userAge);

    @ExtInsert("insert into users(name,age) values(#{name},#{age})")
    int insertUsers(@ExtParam("age") Integer userAge, @ExtParam("name") String name);

}
